QT       += core gui network charts

#include(SingleApplication/singleapplication.pri)
include(SysInfo/SysInfo.pri)
include(PluginsManager/PluginsManager.pri)
include(ConfigWdiget/ConfigWdiget.pri)

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17
 
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
DEFINES+=QT_NO_DEPRECATED_WARNINGS

TARGET = desktop-assist

#DEFINES += HAVE_NVIDIA_ML=0

#contains(DEFINES, HAVE_NVIDIA_ML=1) {
#    message(My custom macro is defined)
#} else {
#    message(My custom macro is not defined)
#}

win32{
    LIBS += -liphlpapi -lole32 -lws2_32
}

equals(HAVE_NVIDIA_ML, 1) {
    message(MHAVE_NVIDIA_ML = 1)
    #如果装了nvidia cuda Toolkit,自行修改库链接目录
    win32{
        INCLUDEPATH += C:/'Program Files'/'NVIDIA GPU Computing Toolkit'/CUDA/v11.8/include
        LIBS += -LC:/'Program Files'/'NVIDIA GPU Computing Toolkit'/CUDA/v11.8/lib/x64 -lnvml
    }
    unix{
        INCLUDEPATH += /usr/local/cuda/include
        LIBS += -L/usr/local/cuda/targets/x86_64-linux/lib/stubs/ -lnvidia-ml
    }
} else {
    message(MHAVE_NVIDIA_ML = 0)
}



SOURCES += \
    DAFuncTools.cpp \
        DAGraphicsInfo.cpp \
    DAHoliday.cpp \
    DASetting.cpp \
    DASystemInfo.cpp \
    DATime.cpp \
    DATray.cpp \
#    SysInfo/SysInfo.cpp \
#    SysInfo/SysInfoImpl.cpp \
    main.cpp \
    DesktopAssist.cpp

HEADERS += \
    DAFuncTools.h \
        DAGraphicsInfo.h \
    DAHoliday.h \
    DASetting.h \
    DASystemInfo.h \
    DATime.h \
    DATray.h \
    DATypes.h \
    DesktopAssist.h \
#    SysInfo/SysInfo.h \
#    SysInfo/SysInfoImpl.h
    single_model.h

DESTDIR += $$PWD/../Bins/$$TARGET

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    src.qrc

DISTFILES += \
    README.md
